package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String[] b = {"喜欢唱,","跳","打篮球"};
        Student ly = new Student("赵总",22,"男",b);
        FileOutputStream fos = new FileOutputStream("zhao.txt");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(ly);
        System.out.println("写出完毕");
        oos.close();
    }
}
